package train48days;


import java.util.Scanner;

public class 查找一个偶数组成最接近的两个素数 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int num = sc.nextInt();
        int[] arr = new int[2];
        for (int i = 1; i <num/2 ; i++) {
            if(issushu(i)&&issushu(num-i)){
                arr[0]=i;
                arr[1]=num-i;
            }
        }
        System.out.println(arr[0]);
        System.out.println(arr[1]);
    }
    public static   boolean issushu(int a){
        for (int i = 2; i < a; i++) {
            if (a%i==0){
                return false;
            }
        }
        return true;
    }
}
